<?php

namespace common\entities\common;

use common\entities\ConfigEntity;
use Yii;

/**
 * This is the model class for table "pigcms_wxuser".
 *
 * @property integer $id
 * @property integer $uid
 * @property string $wxname
 * @property integer $winxintype
 * @property string $appid
 * @property string $appsecret
 * @property string $wxid
 * @property string $weixin
 * @property string $headerpic
 * @property string $token
 * @property string $province
 * @property string $city
 * @property string $qq
 * @property integer $wxfans
 * @property integer $typeid
 * @property string $typename
 * @property string $tongji
 * @property integer $allcardnum
 * @property integer $cardisok
 * @property integer $yetcardnum
 * @property integer $totalcardnum
 * @property string $createtime
 * @property string $tpltypeid
 * @property string $updatetime
 * @property string $tpltypename
 * @property string $tpllistid
 * @property string $tpllistname
 * @property string $tplcontentid
 * @property string $tplcontentname
 * @property integer $color_id
 * @property string $BUGUID
 * @property string $OrganizationId
 * @property string $wx_access_token
 * @property string $wx_access_token_getTime
 * @property string $wx_access_token_expireTime
 * @property string $wx_js_api_ticket
 * @property string $wx_js_api_ticket_getTime
 * @property string $wx_js_api_ticket_expireTime
 */
class PigcmsWxUserEntity extends ConfigEntity
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'pigcms_wxuser';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['uid', 'wxname', 'wxid', 'headerpic', 'token', 'createtime', 'updatetime'], 'required'],
            [['uid', 'winxintype', 'wxfans', 'typeid', 'allcardnum', 'cardisok', 'yetcardnum', 'totalcardnum', 'color_id'], 'integer'],
            [['tongji'], 'string'],
            [['wx_access_token_getTime', 'wx_access_token_expireTime', 'wx_js_api_ticket_getTime', 'wx_js_api_ticket_expireTime'], 'safe'],
            [['wxname', 'city'], 'string', 'max' => 60],
            [['appid', 'appsecret'], 'string', 'max' => 50],
            [['wxid', 'weixin', 'tpltypename', 'tpllistname', 'tplcontentname'], 'string', 'max' => 20],
            [['headerpic', 'token'], 'string', 'max' => 255],
            [['province'], 'string', 'max' => 30],
            [['qq'], 'string', 'max' => 25],
            [['typename'], 'string', 'max' => 90],
            [['createtime', 'updatetime'], 'string', 'max' => 13],
            [['tpltypeid', 'tpllistid', 'tplcontentid'], 'string', 'max' => 2],
            [['BUGUID', 'OrganizationId'], 'string', 'max' => 36],
            [['wx_access_token', 'wx_js_api_ticket'], 'string', 'max' => 512]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'uid' => 'Uid',
            'wxname' => '公众号名称',
            'winxintype' => 'Winxintype',
            'appid' => 'Appid',
            'appsecret' => 'Appsecret',
            'wxid' => '公众号原始ID',
            'weixin' => '微信号',
            'headerpic' => '头像地址',
            'token' => 'Token',
            'province' => '省',
            'city' => '市',
            'qq' => '公众号邮箱',
            'wxfans' => '微信粉丝',
            'typeid' => '分类ID',
            'typename' => '分类名',
            'tongji' => 'Tongji',
            'allcardnum' => 'Allcardnum',
            'cardisok' => 'Cardisok',
            'yetcardnum' => 'Yetcardnum',
            'totalcardnum' => 'Totalcardnum',
            'createtime' => 'Createtime',
            'tpltypeid' => '默认首页模版ID',
            'updatetime' => 'Updatetime',
            'tpltypename' => '首页模版名',
            'tpllistid' => '列表模版ID',
            'tpllistname' => '列表模版名',
            'tplcontentid' => '内容模版ID',
            'tplcontentname' => '内容模版名',
            'color_id' => 'Color ID',
            'BUGUID' => 'Buguid',
            'OrganizationId' => 'Organization ID',
            'wx_access_token' => 'Wx Access Token',
            'wx_access_token_getTime' => 'Wx Access Token Get Time',
            'wx_access_token_expireTime' => 'Wx Access Token Expire Time',
            'wx_js_api_ticket' => 'Wx Js Api Ticket',
            'wx_js_api_ticket_getTime' => 'Wx Js Api Ticket Get Time',
            'wx_js_api_ticket_expireTime' => 'Wx Js Api Ticket Expire Time',
        ];
    }
}
